package sequential_apriori;

public class Main {

	// Constants
	private static final int MAX_DATA_LINES = 1000;

	public static void main(String[] args) {
	
		if(args.length<2) {
			System.out.println("Usage: java sequential_apriori.Main <data-file> <minsupport>");
			System.exit(-1);
		}

		// Read in the data to run the algorithm on
		DataReader dread = new DataReader(args[0]);
		String strippedData = dread.loadDataLines(MAX_DATA_LINES, true);

		// Create a SequentialApriori instance and run the algorithm on the data
		double threshold = Double.parseDouble(args[1]);
		SequentialApriori sa = new SequentialApriori(threshold);
		sa.runApriori(strippedData);

		System.exit(0);
	}

}
